class c4_Storage

Manager for persistent storage of view structures.

Public:

c4_Storage (c4_File* file_ =0);
Constructs streaming-only or descriptor-based storage object.
c4_Storage (c4_Strategy& strategy_);
Constructs a storage using the specified strategy handler.
c4_Storage (const char* filename_, const char* description_);
Constructs a storage object for given file and format.
c4_Storage (const char* filename_, bool canModify_);
Constructs a storage object, keeping the current structure.
~c4_Storage ();

void AutoCommit ();
Sets storage up to always call Commit in the destructor.
c4_RowRef Contents () const;
Gives access to the stored data as a single row.
c4_Strategy& Strategy () const;
Returns the strategy object associated with this storage.
c4_Table& RootTable () const;
Returns the root table entry.
c4_String Description () const;
Returns a description of the data structure.
bool Commit ();
Flushes pending changes to file right now.
bool Rollback ();
(Re)initializes for on-demand loading. This will cancel all uncommitted changes.

c4_ViewRef View (const char* name_) const;
Used to get or set a named view in this storage object.
c4_View GetAs (const char* description_);
Get a named view, redefining it to match the given structure.
c4_View Store (const char* name_, const c4_View& view_);
Attaches a view using specified name in this storage object.
void LoadFromStream (void* _auxArg);
Loads contents from the specified input stream.
void SaveToStream (void* _auxArg);
Saves contents to the specified output stream.


#include "k4view.h"   // Jun 8, 1997